package com.second.app.thread.wait.p_c;


/**
 * @Author GYZ
 * <pre>
 *
 * </pre>
 */
public class MainRun {

    public static void main(String[] args) {
        ProduceConsumeDemo produceConsumeDemo = new ProduceConsumeDemo("ABC");
        new Thread(() -> {
            while (true) {
                produceConsumeDemo.setValue();
            }
        }, "生产线程-01").start();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        new Thread(() -> {
            while (true) {
                produceConsumeDemo.getValue();
            }
        }, "消费线程-01").start();
    }
}

